
/**
 * 设置本地存储
 * @param {*} key String
 * @param {*} value  any
 */
function setStorage(key, value) {
     window.localStorage.setItem(key, JSON.stringify(value));
}

/**
* 获取本地存储
* @param {*} key String
*/
function getStorage(key) {
     return JSON.parse(window.localStorage.getItem(key));
}

/**
 * 清除特定本地存储
 * @param {*} key String
 */
function clearStorage(key) {
     window.localStorage.removeItem(key);
}

/**
 * 清除所有本地存储
 */
function clearAllStorage() {
     window.localStorage.clear();
}



